/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.entity;

import java.util.Date;

import com.jeesite.common.lang.DateUtils;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * kj_timingEntity
 * @author LJ
 * @version 2022-07-20
 */
@Table(name="kj_timing", alias="a", columns={
		@Column(name="timing_id", attrName="timingId", label="timing_id", isPK=true),
		@Column(name="create_time", attrName="createTime", label="创建时间"),
	}, orderBy="a.timing_id DESC"
)
public class KjTiming extends DataEntity<KjTiming> {
	
	private static final long serialVersionUID = 1L;
	private String timingId;		// timing_id
	private Date createTime;		// 创建时间


	// 大于等于 >=
	public Date getCreateDate_gte(){
		return sqlMap.getWhere().getValue("create_time", QueryType.GTE);
	}

	public void setCreateDate_gte(Date createDate){
		createDate = DateUtils.getOfDayFirst(createDate);
		sqlMap.getWhere().and("create_time", QueryType.GTE, createDate);
	}

	public KjTiming() {
		this(null);
	}

	public KjTiming(String id){
		super(id);
	}
	
	public String getTimingId() {
		return timingId;
	}

	public void setTimingId(String timingId) {
		this.timingId = timingId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="创建时间不能为空")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}